classdef LowpassNotchSGM < Cell
    properties
        Q0;
        K;
        n;
        m;
        k;
    end
    
    methods
        function this = LowpassNotchSGM(poles,zeros,g)
            this.Name = 'SGM LowpassNotch';
            this.Poles = poles;
            this.Zeros = zeros;
            this.Gain = g;
            wp = abs(poles(1));
            wz = abs(zeros(1));
            [alpha ~] = cart2pol(real(poles(1)), imag(poles(1)));
            Q = abs(1./(2*sin(abs(alpha-pi/2))));
            this.calcCell(wp,wz,Q,g);
            this.ImagePath = 'Stages Schematics/Sedra_LPNotch.png';
        end
        
        function calcCell(obj,wp,wz,Q,g)
            Qaux = [1/3,0.3,0.2,0.1];

            for l = 1: length(Qaux)
                Q0 = Q*Qaux(l);
                K = 1 + (1/(2*Q0^2))*(1-Q0/Q);
                k = g*(wp/wz)^2/(1-Q0/Q);
                n = k*(1-Q0/(K*Q));
                m = k*((K-1)/K)*(1+2*Q0^2*(wz/wp)^2);
                if (m < 1) && (k < 1) && (n < 1)
                    obj.error = 0;
                    break
                end
            end
            
            if ~obj.error
                resist(3) = 1e3;
                raux = resist(3)/(K-1);
                obj.Q0 = Q0;
                obj.K = K;
                obj.k = k;
                obj.n = n;
                obj.m = m;
            
                wpaux = wp/(2*Q0);
                
                if wpaux < 63
                    caux = 1e-6;
                else
                    if wpaux < 630
                        caux = 100e-9;
                    else
                        if wpaux < 6300
                            caux = 10e-9;
                        else
                            if wpaux < 63000
                                caux = 1e-9;
                            else
                                if wpaux < 630000
                                    caux = 100e-12;
                                else 
                                    caux = 56e-12;
                                end
                            end
                        end
                    end
                end
                
                resist(1) = raux/(1-k);
                resist(2) = raux/k;
                raux = 2*Q0/(wp*caux);
                resist(4) = raux;
                resist(5) = raux/(1-m);
                resist(6) = raux/m;
                obj.Resists = resist;
                
                cap(1) = caux;
                caux = caux/(4*Q0^2);
                cap(2) = caux*(1-n);
                cap(3) = caux*(n);
                obj.Caps = cap;
                
                sens(1) = 0;
                sens(2) = -(obj.Resists(5) + obj.Resists(6))/(2*obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3)))));
                sens(3) =(obj.Resists(5)*(1/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))) - (obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)^2*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3)))))/(2*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3)))));
                sens(4) = (obj.Resists(6)*(1/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))) - (obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)^2*(obj.Caps(2) + obj.Caps(3)))))/(2*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3)))));
                sens(5) = 0;
                sens(6) = 0;
                sens(7) = -(obj.Resists(5) + obj.Resists(6))/(2*obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3)))));
                sens(8) = -(obj.Caps(2)*(obj.Resists(5) + obj.Resists(6)))/(2*obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))^2*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3)))));
                sens(9) = -(obj.Caps(3)*(obj.Resists(5) + obj.Resists(6)))/(2*obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))^2*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3)))));
                obj.Senswp = sens;
                
                sens(1) = (obj.Resists(3)*((obj.Resists(5)*obj.Resists(2) - obj.Resists(6)*obj.Resists(1))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)) - ((obj.Caps(1)*obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2))*(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2)))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2))/(2*((obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))));
                sens(2) = -(obj.Resists(4)*(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2))*(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(2*((obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))*(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2);
                sens(3) = (obj.Resists(5)*((obj.Resists(3)*obj.Resists(2) + obj.Resists(1)*obj.Resists(2))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)) - ((obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2))*(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2))/(2*((obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))));
                sens(4) = -(obj.Resists(6)*((obj.Resists(3)*obj.Resists(1))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)) + ((obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2))*(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2)))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2))/(2*((obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))));
                sens(5) = -(obj.Resists(1)*((obj.Resists(3)*obj.Resists(6) - obj.Resists(5)*obj.Resists(2))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)) + ((obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2))*(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2)))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2))/(2*((obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))));
                sens(6) = (obj.Resists(2)*((obj.Resists(3)*obj.Resists(5) + obj.Resists(5)*obj.Resists(1))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)) - ((obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1))*(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2)))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2))/(2*((obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))));
                sens(7) = -(obj.Caps(1)*(obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2)))/(2*((obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))*(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2);
                sens(8) = -(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2)))/(2*((obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))*(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2);
                sens(9) = -(obj.Caps(3)*(obj.Caps(1)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2)))/(2*((obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2))/(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))*(obj.Caps(1)*obj.Caps(2)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Caps(3)*obj.Resists(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(1)*obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2);
                obj.Senswz = sens;
                
                sens(1) =(obj.Resists(3)*(obj.Caps(1)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(1)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2)))/(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2));
                sens(2) =-(obj.Resists(4)*(((obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*(obj.Caps(2)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2) - ((obj.Resists(5) + obj.Resists(6))*(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(2*obj.Caps(1)*obj.Resists(4)^2*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(3/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))))*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2));
                sens(3) =-(obj.Resists(5)*(((obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*(obj.Caps(2)*obj.Resists(4)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Caps(3)*obj.Resists(4)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2) + ((obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*(1/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))) - (obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)^2*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3)))))/(2*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(3/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))) - (obj.Resists(1)*obj.Resists(2))/(((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))))*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2));
                sens(4) =-(obj.Resists(6)*(((obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*(obj.Caps(2)*obj.Resists(4)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(1) + obj.Caps(2)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2)))/(((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2) + ((obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*(1/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))) - (obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)^2*(obj.Caps(2) + obj.Caps(3)))))/(2*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(3/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))) - (obj.Resists(1)*obj.Resists(2))/(((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))))*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2));
                sens(5) =(obj.Resists(1)*((obj.Resists(5)*obj.Resists(2) + obj.Resists(6)*obj.Resists(2))/(((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))) - ((obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2)))/(((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2))*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2));
                sens(6) =(obj.Resists(2)*((obj.Resists(5)*obj.Resists(1) + obj.Resists(6)*obj.Resists(1))/(((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))) - ((obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)))/(((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2))*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2));
                sens(7) =(obj.Caps(1)*(((obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*(obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2)))/(((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2) + ((obj.Resists(5) + obj.Resists(6))*(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(2*obj.Caps(1)^2*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(3/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))))*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2));
                sens(8) =-(obj.Caps(2)*(((obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*(obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2) - ((obj.Resists(5) + obj.Resists(6))*(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(2*obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))^2*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(3/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))))*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2));
                sens(9) =-(obj.Caps(3)*(((obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*(obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2) - ((obj.Resists(5) + obj.Resists(6))*(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(2*obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))^2*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(3/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2))))*((obj.Resists(5) + obj.Resists(6))/(obj.Caps(1)*obj.Resists(4)*obj.Resists(5)*obj.Resists(6)*(obj.Caps(2) + obj.Caps(3))))^(1/2)*(obj.Caps(2)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(2) - obj.Caps(1)*obj.Resists(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1) + obj.Caps(2)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Caps(2)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(4)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2) + obj.Caps(3)*obj.Resists(5)*obj.Resists(6)*obj.Resists(1)*obj.Resists(2)))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2));
                obj.SensQ = sens;
                
                sens(1) =(obj.Resists(3)*(obj.Resists(5)*obj.Resists(2) - obj.Resists(6)*obj.Resists(1)))/(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2));
                sens(2) =0;
                sens(3) =(obj.Resists(5)*(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*((obj.Resists(3)*obj.Resists(2) + obj.Resists(1)*obj.Resists(2))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2)) - (obj.Resists(1)*obj.Resists(2)*(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2)))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2))/(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2));
                sens(4) =-(obj.Resists(6)*(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*((obj.Resists(3)*obj.Resists(1))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2)) + (obj.Resists(1)*obj.Resists(2)*(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2)))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2))/(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2));
                sens(5) =-(obj.Resists(1)*(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*((obj.Resists(3)*obj.Resists(6) - obj.Resists(5)*obj.Resists(2))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2)) + ((obj.Resists(5)*obj.Resists(2) + obj.Resists(6)*obj.Resists(2))*(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2)))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2))/(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2));
                sens(6) =(obj.Resists(2)*(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))*((obj.Resists(3)*obj.Resists(5) + obj.Resists(5)*obj.Resists(1))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2)) - ((obj.Resists(5)*obj.Resists(1) + obj.Resists(6)*obj.Resists(1))*(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2)))/(obj.Resists(5)*obj.Resists(1)*obj.Resists(2) + obj.Resists(6)*obj.Resists(1)*obj.Resists(2))^2))/(obj.Resists(3)*obj.Resists(5)*obj.Resists(2) - obj.Resists(3)*obj.Resists(6)*obj.Resists(1) + obj.Resists(5)*obj.Resists(1)*obj.Resists(2));
                sens(7) =0;
                sens(8) =0;
                sens(9) =0;
                obj.SensG = sens;
            end
            
            
        end
        
        function componentChange(obj, component, value)
            caps = obj.Caps;
            resists = obj.Resists;
            
            switch component
                case 1
                    obj.Resists(1) = value;
                    raux = obj.Resists(1)*(1 - obj.k);
                    obj.Resists(2) = raux/obj.k;
                    obj.Resists(3) = raux*(obj.K - 1);
                case 2
                    obj.Resists(2) = value;
                    raux = obj.Resists(2)*obj.k;
                    obj.Resists(1) = raux/(1 - obj.k);
                    obj.Resists(3) = raux*(obj.K - 1);
                case 3
                    obj.Resists(3) = value;
                    raux = value/(obj.K - 1);
                    obj.Resists(1) = raux/(1 - obj.k);
                    obj.Resists(2) = raux/obj.k;
                case 4
                    wp = abs(obj.Poles(1));
                    obj.Resists(4) = value;
                    obj.Caps(1) = 2*obj.Q0/(wp*value);
                    caux = obj.Caps(1)/(4*obj.Q0^2);
                    obj.Caps(2) = (1 - obj.n)*caux;
                    obj.Caps(3) = obj.n*caux;
                    obj.Resists(5) = obj.Resists(4)/(1 - obj.m);
                    obj.Resists(6) = obj.Resists(4)/obj.m;
                case 5
                    wp = abs(obj.Poles(1));
                    obj.Resists(5) = value;
                    raux = obj.Resists(5)*(1 - obj.m);
                    obj.Resists(6) = raux/obj.m;
                    obj.Resists(4) = raux;
                    obj.Caps(1) = 2*obj.Q0/(wp*value);
                    caux = obj.Caps(1)/(4*obj.Q0^2);
                    obj.Caps(2) = (1 - obj.n)*caux;
                    obj.Caps(3) = obj.n*caux; 
                case 6
                    wp = abs(obj.Poles(1));
                    obj.Resists(6) = value;
                    raux = obj.Resists(6)*obj.m;
                    obj.Resists(6) = raux/(1 - obj.m);
                    obj.Resists(4) = raux;
                    obj.Caps(1) = 2*obj.Q0/(wp*value);
                    caux = obj.Caps(1)/(4*obj.Q0^2);
                    obj.Caps(2) = (1 - obj.n)*caux;
                    obj.Caps(3) = obj.n*caux;
                case 7
                    wp = abs(obj.Poles(1));
                    obj.Caps(1) = value;
                    caux = obj.Caps(1)/(4*obj.Q0^2);
                    obj.Caps(2) = (1 - obj.n)*caux;
                    obj.Caps(3) = obj.n*caux;
                    raux = 2*obj.Q0/(wp*obj.Caps(1));
                    obj.Resists(6) = raux;
                    obj.Resists(4) = raux/(1 - obj.m);
                    obj.Resists(5) = raux/obj.m;
                case 8
                    wp = abs(obj.Poles(1));
                    obj.Caps(2) = value;
                    caux = value/(1 - obj.m);
                    obj.Caps(3) = caux*obj.m;
                    obj.Caps(1) = caux*4*obj.Q0^2;
                    raux = 2*obj.Q0/(wp*obj.Caps(1));
                    obj.Resists(6) = raux;
                    obj.Resists(4) = raux/(1 - obj.m);
                    obj.Resists(5) = raux/obj.m;
                case 9
                    wp = abs(obj.Poles(1));
                    obj.Caps(3) = value;
                    caux = value/obj.m;
                    obj.Caps(2) = caux*(1 - obj.m);
                     obj.Caps(1) = caux*4*obj.Q0^2;
                    raux = 2*obj.Q0/(wp*obj.Caps(1));
                    obj.Resists(6) = raux;
                    obj.Resists(4) = raux/(1 - obj.m);
                    obj.Resists(5) = raux/obj.m;
            end
            status = obj.validateComponents(obj.Resists,obj.Caps);
            if ~status
                obj.error = 0;
                obj.Resists = resists;
                obj.Caps = caps;
            end
        end
    end
end















